﻿<%@ Page Language="C#" AutoEventWireup="true" ValidateRequest="false" CodeBehind="EditEnterPriseService.aspx.cs"
    Inherits="NJL.Web.AdminEnterprise.EditEnterPriseService" %>

<%@ Register Src="../Controls/UCenterHeader.ascx" TagName="UCenterHeader" TagPrefix="uc4" %>
<%@ Register Src="../Controls/UcenterFooter.ascx" TagName="UcenterFooter" TagPrefix="uc5" %>
<%@ Register Src="../Controls/WUCUserEnterPriseLeft.ascx" TagName="WUCUserEnterPriseLeft"
    TagPrefix="uc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>发布信息</title>
    <script type="text/javascript" src="/ckeditor/ckeditor.js"></script>
    <link href="../Styles/base1.css" rel="stylesheet" type="text/css" />
    <script src="../Scripts/jquery-1.4.1.min.js" type="text/javascript"></script>
    <link href="../Styles/manage.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" language="javascript">
        function check() {
            var $txtAttractionsTitle = $('#<%=txtAttractionsTitle.ClientID %>').val();
            $txtAttractionsTitle = $.trim($txtAttractionsTitle);
            if ($txtAttractionsTitle == "") {
                alert("服务名称不能为空哦");
                return false;
            }
            var serviceType = document.getElementsByName("rblServiceType");
            var servicestate = false;
            for (var i = 0; i < serviceType.length; i++) {
                if (serviceType[i].checked == true) {
                    servicestate = true;
                    break;
                }
            }
            if (!servicestate) {
                alert("请选择服务类型");
                return false;
            }
            var serviceLevel = document.getElementsByName("rblServiceLevel");
            var serviceLevelState = false;
            for (var i = 0; i < serviceLevel.length; i++) {
                if (serviceLevel[i].checked == true) {
                    serviceLevelState = true;
                    break;
                }
            }
            if (!serviceLevelState) {
                alert("请选择服务等级");
                return false;
            }
            var txtDesc = document.getElementById("<%=txtDesc.ClientID %>").value;
            if (txtDesc.length > 500) {
                alert("服务简介数不能超过500个字符哦");
                return false;
            }
        }
    </script>
</head>
<body class="managebg">
    <form id="form1" runat="server">
    <uc4:UCenterHeader ID="UCenterHeader1" runat="server" />
    <div class="managecont02 cleanFlex">
        <!--右侧内容-->
        <div class="f_right manageRight" id="right">
            <!--位置-->
            <div class="place">
                <span>欢迎您：<%=UserName %>&nbsp;&nbsp;[<a href="/Logout.aspx" class="green">退出登陆</a>]</span>
                <p>
                    您现在的位置是&nbsp;<strong><a href="Default.aspx">用户中心</a></strong>&gt;&gt;<strong>编辑服务</strong></p>
            </div>
            <!--基本信息内容-->
            <div class="cleanFlex m_top_10">
            </div>
            <div>
                <!--标题-->
                <div class="titleManageRight">
                    <h2>
                        编辑服务
                    </h2>
                </div>
                <!--内容-->
                <div class="cont cleanFlex write">
                    <p>
                        &nbsp;<strong>服务名称</strong></p>
                    <p>
                        <asp:TextBox ID="txtAttractionsTitle" runat="server" class="inputWrite" Style="width: 700px"
                            MaxLength="50"></asp:TextBox></p>
                    <p>
                        &nbsp;<strong>服务类型</strong></p>
                    <p>
                        <asp:RadioButtonList ID="rblServiceType" runat="server" CellSpacing="0" CellPadding="0"
                            RepeatDirection="Horizontal" RepeatColumns="10" Width="100%">
                        </asp:RadioButtonList>
                    </p>
                    <p>
                        <strong>服务等级</strong></p>
                    <p>
                        <asp:RadioButtonList ID="rblServiceLevel" runat="server" RepeatColumns="5" RepeatDirection="Horizontal"
                            CellPadding="0" CellSpacing="0">
                        </asp:RadioButtonList>
                    </p>
                    <!--编辑-->
                    <div class="m_top_10">
                       <p><strong>服务简介</strong></p>
                        <asp:TextBox ID="txtDesc" runat="server" CssClass="input" TextMode="MultiLine"
                            Height="61px" Width="100%"></asp:TextBox>
                        <p>
                            <strong>服务内容</strong></p>
                        <asp:TextBox ID="txtContent" runat="server" CssClass="input" TextMode="MultiLine"
                            Height="61px" Width="100%"></asp:TextBox>
                        <script type="text/javascript">
                            CKEDITOR.replace('<%=txtContent.ClientID%>',
                            {
                            //                                filebrowserBrowseUrl: '/ckfinder/ckfinder.html', //启用浏览功能
                            //                                filebrowserImageBrowseUrl: '/ckfinder/ckfinder.html?Type=Images',
                            //                                filebrowserFlashBrowseUrl: '/ckfinder/ckfinder.html?Type=Flash',
                            //                                filebrowserUploadUrl: '/ckfinder/core/connector/aspx/connector.aspx?command=QuickUpload&type=Files',
                            //                                filebrowserImageUploadUrl: '/ckfinder/core/connector/aspx/connector.aspx?command=QuickUpload&type=Images',
                            //                                filebrowserFlashUploadUrl: '/ckfinder/core/connector/aspx/connector.aspx?command=QuickUpload&type=Flash
                        }
                            );
                        </script>
                        <p>
                            <strong>标签</strong></p>
                        <p>
                            <asp:TextBox ID="txtTag" runat="server" Width="400px" class="inputWrite" Style="width: 500px"
                                MaxLength="100"></asp:TextBox>(多个标签请用逗号隔开)</p>
                        <p>
                            <strong>图片</strong><asp:FileUpload ID="FileUpload1" runat="server" CssClass="input"
                                align="ablmiddle" />&nbsp;&nbsp;
                            <asp:Button ID="bntUpload" runat="server" OnClick="bntUpload_Click" Text="上传" CssClass="greenBtn"
                                onmouseover="this.className='greenBtnOver'" onmouseout="this.className='greenBtn'" />
                        </p>
                        <p>
                            <asp:Image ID="Image1" runat="server" Width="600px" Height="450px" />
                        </p>
                        <p class="centeralign">
                            <asp:Button ID="btnSubmit" runat="server" OnClick="btnSubmit_Click" Text="修改服务" class="redbtn"
                                OnClientClick="return check()" /></p>
                    </div>
                </div>
            </div>
        </div>
        <uc1:WUCUserEnterPriseLeft ID="WUCUserEnterPriseLeft1" runat="server" />
        <div class="managecontbottom">
        </div>
    </div>
    <uc5:UcenterFooter ID="UcenterFooter1" runat="server" />
    </form>
</body>
</html>
